home *** CD-ROM | disk | FTP | other *** search
/ Best-of-Class Shareware / 24 Karat Shareware - Publisher's Picks.ISO / disk9 / winody / install / ody2wevj.lzh / WINDOWS.INC < prev    next >
Text File  |  1994-10-05  |  12KB  |  353 lines

  1.  
  2. (*=========================================================================*)
  3. (*                                                                         *)
  4. (*  Odyssey Script Include File, for scripts which access the Windows API  *)
  5. (*                                                                         *)
  6. (*                                                                         *)
  7. (*  Don Milne, October 1994                                                *)
  8. (*=========================================================================*)
  9.  
  10. #ifndef WINDOWS_H
  11. #define WINDOWS_H
  12.  
  13. /* General Windows messages */
  14. CONST WM_NULL          = 0;
  15.       WM_USER          = $0400;
  16.       WM_QUIT          = $0012;
  17.       WM_SETREDRAW     = $000B;
  18.       WM_ENABLE        = $000A;
  19.       WM_SETTEXT       = $000C;
  20.       WM_GETTEXT       = $000D;
  21.       WM_GETTEXTLENGTH = $000E;
  22.       WM_QUERYOPEN     = $0013;
  23.       WM_CLOSE         = $0010;
  24.       WM_KEYDOWN       = $0100;
  25.       WM_KEYUP         = $0101;
  26.       WM_CHAR          = $0102;
  27.       WM_DEADCHAR      = $0103;
  28.       WM_SYSKEYDOWN    = $0104;
  29.       WM_SYSKEYUP      = $0105;
  30.       WM_SYSCHAR       = $0106;
  31.       WM_SYSDEADCHAR   = $0107;
  32.       WM_COMMAND       = $0111;
  33.       WM_SETFONT       = $0030;
  34.       WM_GETFONT       = $0031;
  35.  
  36.  
  37. /* Keyboard message range */
  38. CONST WM_KEYFIRST      = $0100;
  39.       WM_KEYLAST       = $0108;
  40.  
  41. /* Dialog notification messages */
  42. CONST WM_INITDIALOG    = $0110;
  43.       WM_NEXTDLGCTL    = $0028;
  44.       WM_PARENTNOTIFY  = $0210;
  45.       WM_ENTERIDLE     = $0121;
  46.  
  47. /* Mouse input messages */
  48. CONST WM_MOUSEMOVE     = $0200;
  49.       WM_LBUTTONDOWN   = $0201;
  50.       WM_LBUTTONUP     = $0202;
  51.       WM_LBUTTONDBLCLK = $0203;
  52.       WM_RBUTTONDOWN   = $0204;
  53.       WM_RBUTTONUP     = $0205;
  54.       WM_RBUTTONDBLCLK = $0206;
  55.       WM_MBUTTONDOWN   = $0207;
  56.       WM_MBUTTONUP     = $0208;
  57.       WM_MBUTTONDBLCLK = $0209;
  58.  
  59. /* Mouse message wParam key states */
  60. CONST MK_LBUTTON       = $0001;
  61.       MK_RBUTTON       = $0002;
  62.       MK_SHIFT         = $0004;
  63.       MK_CONTROL       = $0008;
  64.       MK_MBUTTON       = $0010;
  65.  
  66. /* Virtual key codes */
  67. #ifdef INCVKEYCODES
  68. CONST VK_LBUTTON       = $01;
  69.       VK_RBUTTON       = $02;
  70.       VK_CANCEL        = $03;
  71.       VK_MBUTTON       = $04;
  72.       VK_BACK          = $08;
  73.       VK_TAB           = $09;
  74.       VK_CLEAR         = $0C;
  75.       VK_RETURN        = $0D;
  76.       VK_SHIFT         = $10;
  77.       VK_CONTROL       = $11;
  78.       VK_MENU          = $12;
  79.       VK_PAUSE         = $13;
  80.       VK_CAPITAL       = $14;
  81.       VK_ESCAPE        = $1B;
  82.       VK_SPACE         = $20;
  83.       VK_PRIOR         = $21;
  84.       VK_NEXT          = $22;
  85.       VK_END           = $23;
  86.       VK_HOME          = $24;
  87.       VK_LEFT          = $25;
  88.       VK_UP            = $26;
  89.       VK_RIGHT         = $27;
  90.       VK_DOWN          = $28;
  91.       VK_SELECT        = $29;
  92.       VK_PRINT         = $2A;
  93.       VK_EXECUTE       = $2B;
  94.       VK_SNAPSHOT      = $2C;
  95.       VK_INSERT        = $2D;
  96.       VK_DELETE        = $2E;
  97.       VK_HELP          = $2F;
  98.       VK_NUMPAD0       = $60;
  99.       VK_NUMPAD1       = $61;
  100.       VK_NUMPAD2       = $62;
  101.       VK_NUMPAD3       = $63;
  102.       VK_NUMPAD4       = $64;
  103.       VK_NUMPAD5       = $65;
  104.       VK_NUMPAD6       = $66;
  105.       VK_NUMPAD7       = $67;
  106.       VK_NUMPAD8       = $68;
  107.       VK_NUMPAD9       = $69;
  108.       VK_MULTIPLY      = $6A;
  109.       VK_ADD           = $6B;
  110.       VK_SEPARATOR     = $6C;
  111.       VK_SUBTRACT      = $6D;
  112.       VK_DECIMAL       = $6E;
  113.       VK_DIVIDE        = $6F;
  114.       VK_F1            = $70;
  115.       VK_F2            = $71;
  116.       VK_F3            = $72;
  117.       VK_F4            = $73;
  118.       VK_F5            = $74;
  119.       VK_F6            = $75;
  120.       VK_F7            = $76;
  121.       VK_F8            = $77;
  122.       VK_F9            = $78;
  123.       VK_F10           = $79;
  124.       VK_F11           = $7A;
  125.       VK_F12           = $7B;
  126.       VK_F13           = $7C;
  127.       VK_F14           = $7D;
  128.       VK_F15           = $7E;
  129.       VK_F16           = $7F;
  130.       VK_F17           = $80;
  131.       VK_F18           = $81;
  132.       VK_F19           = $82;
  133.       VK_F20           = $83;
  134.       VK_F21           = $84;
  135.       VK_F22           = $85;
  136.       VK_F23           = $86;
  137.       VK_F24           = $87;
  138.       VK_NUMLOCK       = $90;
  139.       VK_SCROLL        = $91;
  140.  
  141. /* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */
  142. /* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' */
  143.  
  144. #endif  /* INCVKEYCODES */
  145.  
  146. /* System Menu messages and wParam Values */
  147. CONST WM_SYSCOMMAND    = $0112;
  148.       SC_MINIMIZE      = $F020;
  149.       SC_MAXIMIZE      = $F030;
  150.       SC_NEXTWINDOW    = $F040;
  151.       SC_PREVWINDOW    = $F050;
  152.       SC_CLOSE         = $F060;
  153.       SC_RESTORE       = $F120;
  154.       SC_TASKLIST      = $F130;
  155.       SC_SCREENSAVE    = $F140;
  156.       SC_HOTKEY        = $F150;
  157.  
  158.  
  159. /* MDI messages */
  160. CONST WM_MDICREATE        = $0220;
  161.       WM_MDIDESTROY       = $0221;
  162.       WM_MDIACTIVATE      = $0222;
  163.       WM_MDIRESTORE       = $0223;
  164.       WM_MDINEXT          = $0224;
  165.       WM_MDIMAXIMIZE      = $0225;
  166.       WM_MDITILE          = $0226;
  167.       WM_MDICASCADE       = $0227;
  168.       WM_MDIICONARRANGE   = $0228;
  169.       WM_MDIGETACTIVE     = $0229;
  170.       WM_MDISETMENU       = $0230;
  171.       MDITILE_VERTICAL    = $0000;
  172.       MDITILE_HORIZONTAL  = $0001;
  173.       MDITILE_SKIPDISABLED = $0002;
  174.       WM_CHILDACTIVATE    = $0022;
  175.  
  176. /* Edit control messages */
  177. CONST EM_GETSEL        = (WM_USER+0);
  178.       EM_SETSEL        = (WM_USER+1);
  179.       EM_GETRECT       = (WM_USER+2);
  180.       EM_SETRECT       = (WM_USER+3);
  181.       EM_SETRECTNP     = (WM_USER+4);
  182.       EM_LINESCROLL    = (WM_USER+6);
  183.       EM_GETMODIFY     = (WM_USER+8);
  184.       EM_SETMODIFY     = (WM_USER+9);
  185.       EM_GETLINECOUNT  = (WM_USER+10);
  186.       EM_LINEINDEX     = (WM_USER+11);
  187.       EM_LINELENGTH    = (WM_USER+17);
  188.       EM_REPLACESEL    = (WM_USER+18);
  189.       EM_GETLINE       = (WM_USER+20);
  190.       EM_LIMITTEXT     = (WM_USER+21);
  191.       EM_CANUNDO       = (WM_USER+22);
  192.       EM_UNDO          = (WM_USER+23);
  193.       EM_FMTLINES      = (WM_USER+24);
  194.       EM_LINEFROMCHAR  = (WM_USER+25);
  195.       EM_SETTABSTOPS   = (WM_USER+27);
  196.       EM_SETPASSWORDCHAR = (WM_USER+28);
  197.       EM_EMPTYUNDOBUFFER = (WM_USER+29);
  198.       EM_GETFIRSTVISIBLELINE = (WM_USER+30);
  199.       EM_SETREADONLY   = (WM_USER+31);
  200.       EM_GETPASSWORDCHAR = (WM_USER+34);
  201.       EN_SETFOCUS      = $0100;
  202.       EN_KILLFOCUS     = $0200;
  203.       EN_CHANGE        = $0300;
  204.       EN_UPDATE        = $0400;
  205.       EN_ERRSPACE      = $0500;
  206.       EN_MAXTEXT       = $0501;
  207.       EN_HSCROLL       = $0601;
  208.       EN_VSCROLL       = $0602;
  209.  
  210. /* List box messages */
  211. CONST LB_ADDSTRING     = (WM_USER+1);
  212.       LB_INSERTSTRING  = (WM_USER+2);
  213.       LB_DELETESTRING  = (WM_USER+3);
  214.       LB_RESETCONTENT  = (WM_USER+5);
  215.       LB_SETSEL        = (WM_USER+6);
  216.       LB_SETCURSEL     = (WM_USER+7);
  217.       LB_GETSEL        = (WM_USER+8);
  218.       LB_GETCURSEL     = (WM_USER+9);
  219.       LB_GETTEXT       = (WM_USER+10);
  220.       LB_GETTEXTLEN    = (WM_USER+11);
  221.       LB_GETCOUNT      = (WM_USER+12);
  222.       LB_SELECTSTRING  = (WM_USER+13);
  223.       LB_DIR           = (WM_USER+14);
  224.       LB_GETTOPINDEX   = (WM_USER+15);
  225.       LB_FINDSTRING    = (WM_USER+16);
  226.       LB_GETSELCOUNT   = (WM_USER+17);
  227.       LB_GETSELITEMS   = (WM_USER+18);
  228.       LB_SETTABSTOPS   = (WM_USER+19);
  229.       LB_GETHORIZONTALEXTENT = (WM_USER+20);
  230.       LB_SETHORIZONTALEXTENT = (WM_USER+21);
  231.       LB_SETCOLUMNWIDTH = (WM_USER+22);
  232.       LB_SETTOPINDEX   = (WM_USER+24);
  233.       LB_GETITEMRECT   = (WM_USER+25);
  234.       LB_GETITEMDATA   = (WM_USER+26);
  235.       LB_SETITEMDATA   = (WM_USER+27);
  236.       LB_SELITEMRANGE  = (WM_USER+28);
  237.       LB_SETCARETINDEX = (WM_USER+31);
  238.       LB_GETCARETINDEX = (WM_USER+32);
  239.       LB_SETITEMHEIGHT = (WM_USER+33);
  240.       LB_GETITEMHEIGHT = (WM_USER+34);
  241.       LB_FINDSTRINGEXACT = (WM_USER+35);
  242.       LBN_ERRSPACE     = -2;
  243.       LBN_SELCHANGE    = 1;
  244.       LBN_DBLCLK       = 2;
  245.       LBN_SELCANCEL    = 3;
  246.       LBN_SETFOCUS     = 4;
  247.       LBN_KILLFOCUS    = 5;
  248.  
  249. /* Combo-listbox messages and notification codes */
  250. CONST CB_GETEDITSEL    = (WM_USER+0);
  251.       CB_LIMITTEXT     = (WM_USER+1);
  252.       CB_SETEDITSEL    = (WM_USER+2);
  253.       CB_ADDSTRING     = (WM_USER+3);
  254.       CB_DELETESTRING  = (WM_USER+4);
  255.       CB_DIR           = (WM_USER+5);
  256.       CB_GETCOUNT      = (WM_USER+6);
  257.       CB_GETCURSEL     = (WM_USER+7);
  258.       CB_GETLBTEXT     = (WM_USER+8);
  259.       CB_GETLBTEXTLEN  = (WM_USER+9);
  260.       CB_INSERTSTRING  = (WM_USER+10);
  261.       CB_RESETCONTENT  = (WM_USER+11);
  262.       CB_FINDSTRING    = (WM_USER+12);
  263.       CB_SELECTSTRING  = (WM_USER+13);
  264.       CB_SETCURSEL     = (WM_USER+14);
  265.       CB_SHOWDROPDOWN  = (WM_USER+15);
  266.       CB_GETITEMDATA   = (WM_USER+16);
  267.       CB_SETITEMDATA   = (WM_USER+17);
  268.       CB_GETDROPPEDCONTROLRECT = (WM_USER+18);
  269.       CB_SETITEMHEIGHT = (WM_USER+19);
  270.       CB_GETITEMHEIGHT = (WM_USER+20);
  271.       CB_SETEXTENDEDUI = (WM_USER+21);
  272.       CB_GETEXTENDEDUI = (WM_USER+22);
  273.       CB_GETDROPPEDSTATE = (WM_USER+23);
  274.       CB_FINDSTRINGEXACT = (WM_USER+24);
  275.       CBN_ERRSPACE     = -1;
  276.       CBN_SELCHANGE    = 1;
  277.       CBN_DBLCLK       = 2;
  278.       CBN_SETFOCUS     = 3;
  279.       CBN_KILLFOCUS    = 4;
  280.       CBN_EDITCHANGE   = 5;
  281.       CBN_EDITUPDATE   = 6;
  282.       CBN_DROPDOWN     = 7;
  283.       CBN_CLOSEUP      = 8;
  284.       CBN_SELENDOK     = 9;
  285.       CBN_SELENDCANCEL = 10;
  286.  
  287.  
  288. /* DlgDirList, DlgDirListComboBox flags values */
  289. CONST DDL_READWRITE    = $0000;
  290.       DDL_READONLY     = $0001;
  291.       DDL_HIDDEN       = $0002;
  292.       DDL_SYSTEM       = $0004;
  293.       DDL_DIRECTORY    = $0010;
  294.       DDL_ARCHIVE      = $0020;
  295.       DDL_DRIVES       = $4000;
  296.       DDL_EXCLUSIVE    = $8000;
  297.  
  298.       
  299. /* Standard dialog button IDs */
  300. CONST IDOK             = 1;
  301.       IDCANCEL         = 2;
  302.       IDABORT          = 3;
  303.       IDRETRY          = 4;
  304.       IDIGNORE         = 5;
  305.       IDYES            = 6;
  306.       IDNO             = 7;
  307.       IDHELP           = 998;
  308.  
  309.  
  310. /* WinHelp() commands */
  311. CONST HELP_CONTEXT     = $0001;
  312.       HELP_QUIT        = $0002;
  313.       HELP_INDEX       = $0003;
  314.       HELP_CONTENTS    = $0003;
  315.       HELP_HELPONHELP  = $0004;
  316.       HELP_SETINDEX    = $0005;
  317.       HELP_SETCONTENTS = $0005;
  318.       HELP_CONTEXTPOPUP = $0008;
  319.       HELP_FORCEFILE   = $0009;
  320.       HELP_KEY         = $0101;
  321.       HELP_COMMAND     = $0102;
  322.       HELP_PARTIALKEY  = $0105;
  323.       HELP_MULTIKEY    = $0201;
  324.       HELP_SETWINPOS   = $0203;
  325.  
  326. /* MessageBox() values */
  327. CONST MB_OK               = $0000;
  328.       MB_OKCANCEL         = $0001;
  329.       MB_ABORTRETRYIGNORE = $0002;
  330.       MB_YESNOCANCEL      = $0003;
  331.       MB_YESNO            = $0004;
  332.       MB_RETRYCANCEL      = $0005;
  333.       MB_TYPEMASK         = $000F;
  334.       MB_ICONHAND         = $0010;
  335.       MB_ICONQUESTION     = $0020;
  336.       MB_ICONEXCLAMATION  = $0030;
  337.       MB_ICONASTERISK     = $0040;
  338.       MB_ICONMASK         = $00F0;
  339.       MB_ICONINFORMATION  = MB_ICONASTERISK;
  340.       MB_ICONSTOP         = MB_ICONHAND;
  341.       MB_DEFBUTTON1       = $0000;
  342.       MB_DEFBUTTON2       = $0100;
  343.       MB_DEFBUTTON3       = $0200;
  344.       MB_DEFMASK          = $0F00;
  345.  
  346.  
  347. func MAKELONG(lo,hi:Number):Long; begin return Long(hi)*$10000+lo; end;
  348. func LOWORD(x:Long):Number; begin return Number(x); end;
  349. func HIWORD(x:Long):Number; begin return Number(x/$10000); end;
  350.  
  351. #endif
  352.  
  353.